package com.bbzn.device.client.dto.ct.request;

import com.alibaba.fastjson.JSONObject;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;

/**
 * @Author wulongbo
 * @Date 2021/9/11 13:59
 * @Version 1.0
 */

@Getter
@Setter
@ToString
public class CommandParam implements Serializable {

    private static final long serialVersionUID = 5364823962634168970L;

    /**
     * 命令对应的服务ID
     */
    private String serviceId;

    /**
     * 命令服务下具体的命令名称
     */
    private String method;

    /**
     * 指令参数，格式为json
     */
    private JSONObject paras;

    public JSONObject setImei(String imei) {
        if (this.paras.containsKey("deviceid")) {
            this.paras.put("deviceid", imei);
        }
        return this.paras;
    }

}
